package {
	import nl.ypmits.utils.as3.tween.tweener.MotionBlurTweener;

	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.geom.Point;

	/**
	 * @author Dave Lenz
	 */
	public class MotionBlurTest extends Sprite {

		private var item : Sprite;
		
		public function MotionBlurTest() {
			item = new Sprite( );
			item.graphics.beginFill( 0xFF9900, .5 );
			item.graphics.drawRect( 0, 0, 100, 50 );
			item.graphics.endFill( );
			item.x = 100;
			item.y = 100;
			addChild( item );
			
			stage.addEventListener( MouseEvent.CLICK, mouseHandler );
		}

		
		private function mouseHandler(event : MouseEvent) : void {
			MotionBlurTweener.addTween( item, {target:new Point(mouseX, mouseY), maxblur:40} );
		}
	}
}
